package org.secangkirkopipanas.gxtcore.client;

import org.secangkirkopipanas.gxtcore.domain.ILoginResult;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("GxtCoreRemoteService")
public interface GxtCoreRemoteService extends RemoteService {
	/**
	 * Utility class for simplifying access to the instance of async service.
	 */
	public static class Util {
		private static GxtCoreRemoteServiceAsync instance;

		public static GxtCoreRemoteServiceAsync getInstance() {
			if (instance == null) {
				instance = GWT.create(GxtCoreRemoteService.class);
			}
			return instance;
		}
	}

	public ILoginResult login(String username, String password);

	public void logout();
}